import instance from '../../utils/request'

const base = 'cookcar-plat/'

// 提交添加爱车表单
export function saveMyLovelyCar(data) {
  const config = {
    method: 'post',
    url: `${base}apply/loveCarC/saveC`,
    data
  }
  return instance(config)
}
// 查询我的爱车列表
export function getMyLovelyCar() {
  const config = {
    method: 'get',
    url: `${base}apply/loveCarC/listC?limit=20&page=1`
  }
  return instance(config)
}
// 查询一个我的爱车
export function getOneCar(id) {
  const config = {
    method: 'get',
    url: `${base}apply/loveCarC/${id}`
  }
  return instance(config)
}
// 编辑我的爱车
export function editMyCar(data) {
  const config = {
    method: 'put',
    url: `${base}apply/loveCarC/updateC`,
    data
  }
  return instance(config)
}
// 删除我的爱车
export function deleteMyCar(data) {
  const config = {
    method: 'delete',
    url: `${base}apply/loveCarC/deleteC`,
    data
  }
  return instance(config)
}